/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Attributes.ipp.zapt

#include <clusters/WindowCovering/Attributes.h>

#include <app/data-model/Decode.h>
#include <app/data-model/WrappedStructEncoder.h>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace WindowCovering
		{
			namespace Attributes
			{
				CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader &reader,
									   const ConcreteAttributePath &path)
				{
					switch (path.mAttributeId) {
					case Attributes::Type::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, type);
					case Attributes::PhysicalClosedLimitLift::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, physicalClosedLimitLift);
					case Attributes::PhysicalClosedLimitTilt::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, physicalClosedLimitTilt);
					case Attributes::CurrentPositionLift::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, currentPositionLift);
					case Attributes::CurrentPositionTilt::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, currentPositionTilt);
					case Attributes::NumberOfActuationsLift::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, numberOfActuationsLift);
					case Attributes::NumberOfActuationsTilt::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, numberOfActuationsTilt);
					case Attributes::ConfigStatus::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, configStatus);
					case Attributes::CurrentPositionLiftPercentage::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, currentPositionLiftPercentage);
					case Attributes::CurrentPositionTiltPercentage::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, currentPositionTiltPercentage);
					case Attributes::OperationalStatus::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, operationalStatus);
					case Attributes::TargetPositionLiftPercent100ths::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, targetPositionLiftPercent100ths);
					case Attributes::TargetPositionTiltPercent100ths::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, targetPositionTiltPercent100ths);
					case Attributes::EndProductType::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, endProductType);
					case Attributes::CurrentPositionLiftPercent100ths::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, currentPositionLiftPercent100ths);
					case Attributes::CurrentPositionTiltPercent100ths::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, currentPositionTiltPercent100ths);
					case Attributes::InstalledOpenLimitLift::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, installedOpenLimitLift);
					case Attributes::InstalledClosedLimitLift::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, installedClosedLimitLift);
					case Attributes::InstalledOpenLimitTilt::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, installedOpenLimitTilt);
					case Attributes::InstalledClosedLimitTilt::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, installedClosedLimitTilt);
					case Attributes::Mode::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, mode);
					case Attributes::SafetyStatus::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, safetyStatus);
					case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, generatedCommandList);
					case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, acceptedCommandList);
					case Attributes::AttributeList::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, attributeList);
					case Attributes::FeatureMap::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, featureMap);
					case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
						return DataModel::Decode(reader, clusterRevision);
					default:
						return CHIP_NO_ERROR;
					}
				}
			} // namespace Attributes
		} // namespace WindowCovering
	} // namespace Clusters
} // namespace app
} // namespace chip
